using Framework;
using UnityEngine;
using UnityEngine.UI;

namespace GameCore.UI
{
    public class MainMenuUI : MonoBehaviour
    {
        public Button btn_CreateNewGame;
        public Button btn_LoadGame;
        public Button btn_Settings;
        public Button btn_Exit;

        private void Awake()
        {
            btn_CreateNewGame.onClick.AddListener(CreateNewGame);
            btn_LoadGame.onClick.AddListener(LoadGame);
            btn_LoadGame.interactable = false;
            btn_Settings.interactable = false;
            btn_Exit.onClick.AddListener(ExitGame);
        }

        private void CreateNewGame()
        {
            GameManager.LoadScene("LevelScene");
        }

        private void LoadGame()
        {
            GameManager.SetValue("save_name", "demo_save");
            GameManager.LoadScene("LevelScene");
        }

        private void ExitGame()
        {
            Application.Quit();
        }
    }
}